package com.my.structuraltype.proxy.simple;

public class TalkProxy implements ITalk {
	
	ITalk talk;

	public TalkProxy(ITalk talk) {
		super();
		this.talk = talk;
	}

	@Override
	public void talk(String msg) {
		talk.talk(msg);
	}
	
	public void talk(String msg, String songName) {
		talk.talk(msg);
		sing(songName);
	}
	
	private void sing(String songName) {
		System.out.println("唱歌: " + songName);
	}

}
